Hot-Swapping Between a Mark&Sweep and a Mark&Compact Garbage Collector in a Generational Environment
نویسنده
چکیده
This paper describes a novel method for dynamically switching between a Mark&Compact (M&C) and a Mark&Sweep (M&S) garbage collector in the generational memory system of a high performance Java virtual machine. A M&C collector reclaims space by sliding all live objects towards the beginning of the heap. A M&S collector de-allocates garbage objects in-place. In this paper, both algorithms are assumed to operate over the old generation of a generational memory system and on their own provide different trade-offs to the application that uses them: faster old collections but with slower young collections and the possibility of fragmentation (M&S) or slower old collections but with faster young collections and the guarantee to eliminate fragmentation (M&C). We propose Hot-Swapping, a technique for dynamically switching between these two algorithms, to attempt to achieve the “best of both worlds”. Its introduction to the memory system of the virtual machine imposed minimal changes to the existing implementations of M&C and M&S and virtually no extra performance overhead. Experimental results, presented in the paper, show that this hybrid scheme can either outperform both algorithms, or is very close to the faster of the two (whether this is M&S or M&C), while never being the slowest.
منابع مشابه
A Comparative Evaluation of Parallel Garbage Collector Implementations
While uniprocessor garbage collection is relatively well understood, experience with collectors for large multiprocessor servers is limited and it is unknown which techniques best scale with large memories and large numbers of processors. In order to explore these issues we designed a modular garbage collection framework in the IBM Jalapeño Java virtual machine and implemented five different pa...
متن کاملA Multithreaded Concurrent Garbage Collector Parallelizing the New Instruction in Java
1 Parallel, multithreaded Java applications such as web servers, database servers, and scientific applications are becoming increasingly prevalent. Most of them have high object instantiation rates through the new bytecode that is implemented in a garbage collection subsystem typically. For aforementioned applications, traditional garbage collectors are often the bottleneck that limits program ...
متن کاملA Simple and Efficient Copying Garbage Collector for Prolog
We show how to implement eecient copying garbage collection for Prolog. We measure the eeciency of the collector compared to a standard mark-sweep algorithm on several programs. We then show how to acco-modate generational garbage collection and Prolog primitives that make the implementation more diicult. The resulting algorithms are simpler and more eecient than the standard mark-sweep method ...
متن کاملImmix Garbage Collection: Fast Collection, Space Efficiency, and Mutator Locality
No current garbage collector combines space efficiency, low collector times, and mutator (application) locality for contemporaneously allocated objects. For example, free-list allocation coupled with mark-sweep collection achieves space efficiency, but poor mutator locality. On the other hand, contiguous (bump-pointer) allocation with copying collection provides mutator locality but poor space ...
متن کاملGarbage Collection Alternatives for Icon
Copying garbage collectors are becoming the collectors of choice for very high-level languages and for functional and object-oriented languages. Copying collectors are particularly efficient for large storage regions because their execution time is proportional only to the amount of accessible data, and they identify and compact this data in one pass. In contrast, mark-and-sweep collectors exec...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001